home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
Other Langs
/
Parallaxis_20
/
prim.p
< prev
next >
Wrap
Text File
|
1990-05-31
|
415b
|
21 lines
SYSTEM sieve;
CONFIGURATION list [200];
CONNECTION (* none *);
SCALAR prime: integer;
VECTOR candidate: boolean;
BEGIN
PARALLEL
candidate := id_no >= 2;
WHILE candidate DO
prime:= REDUCE.First(id_no);
WriteInt(prime,10); WriteLn;
IF id_no MOD prime = 0 (* remove multiples *)
THEN candidate := FALSE
END
END
ENDPARALLEL
END sieve.